<template>
	<view class="SearchContent">
		<view class="content">
			<view v-for="(item,index) in searchList" :key="index" class="content-i" @click="toDetail(item.pid)">
				<view class="c-img">
					<image :src="item.smallImg" mode="widthFix"></image>
				</view>			
				<view class="name">{{item.name}}</view>
				<view class="ename">{{item.enname}}</view>
				<view class="price">¥{{item.price}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			searchList:Array
		},
		methods:{
			toDetail(e){
				uni.navigateTo({
						url:`../detail/Detail?pid=${e}`,
				})
			}
		}
	}
</script>

<style scoped>
	.SearchContent{
		min-height: 100rpx;
		padding: 20rpx;
	}
	.content{
		width: 100%;
		display: flex;
/* 		justify-content: flex-start; */
		flex-wrap: wrap;
	}
	.c-img>image{
		width: 200rpx;
	}
	.name{
		width: 100%;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		font-size: 30rpx;
	}
	.ename{
		width: 100%;
		font-size: 25rpx;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		color:  #b7b8b8;
	}
	.price{
		font-size: 30rpx;
		color: #0C34BA;
		font-weight: bold;
	}
	.content-i{
		/* flex: 1; */
		margin-left: 20rpx;
		width: 200rpx;
	}
</style>
